import request from '@/utils/request'


export default{
    getChapter(courseId) {
        //根据番剧id获取章节和视频id
        return request({
          url: `/eduService/chapter/getChapter/${courseId}`,
          method: 'get',
        })
      },
    //添加章节
    addChapter(chapter) {
      return request({
        url: '/eduService/chapter/addChapter',
        method: 'post',
        data:chapter
      })
    },
    //根据章节id获取
    getChapterInfo(chapterId) {
      return request({
        url: `/eduService/chapter/getChapterInfo/${chapterId}`,
        method: 'get',
      })
    },
    //更新章节
    updateChapterInfo(chapter) {
      return request({
        url: '/eduService/chapter/updateChapterInfo',
        method: 'post',
        data:chapter
      })
    },
    //删除章节
    removeChapter(chapterId) {
      return request({
        url: `/eduService/chapter/removeChapter/${chapterId}`,
        method: 'delete',
      })
    },

}
